(dired-flag-backup-files): Handle `*' made by `ls -F'.
authorRichard M. Stallman <rms@gnu.org>
Sat, 5 Jun 1993 17:41:50 +0000 (17:41 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 5 Jun 1993 17:41:50 +0000 (17:41 +0000)
lisp/dired.el

index 6dacbbd3db51091409a62f542877cac011626dfd..9d0fd907eea3687be664c4a0ac517c21a93497ac 100644 (file)
@@ -1735,7 +1735,16 @@ With prefix argument, unflag these files."
      ;; It is less than general to check for ~ here,
      ;; but it's the only way this runs fast enough.
      (and (save-excursion (end-of-line)
-                         (eq (preceding-char) ?~))
+                            (or
+                             (eq (preceding-char) ?~)
+                            ;; Handle executables in case of -F option.
+                            ;; We need not worry about the other kinds
+                            ;; of markings that -F makes, since they won't
+                            ;; appear on real backup files.
+                             (if (eq (preceding-char) ?*)
+                                 (progn
+                                   (forward-char -1)
+                                   (eq (preceding-char) ?~)))))
          (not (looking-at dired-re-dir))
          (let ((fn (dired-get-filename t t)))
            (if fn (backup-file-name-p fn))))